package com.weixin.paleituo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Author yichao
 * Time  2018/3/30 11:30
 * Dest  ${TODO}
 */

public class NofailureBean implements Parcelable {
    /**
     * storename : 智能家居1:1:1
     * storeId : 91
     * cart : [{"spec_info":"尺寸：55 颜色：红色 ","gsp":[{"id":33,"addtime":1520232900000,"deletestatus":0,"sequence":4,"specId":16,"specimageId":null,"value":"55寸","goodsSpecification":{"id":16,"addtime":1520232672000,"deletestatus":0,"name":"尺寸","remarkName":null,"sequence":55,"specColor":0,"specType":1,"type":"text","goodsclassId":681,"storeId":90}},{"id":42,"addtime":1520408769000,"deletestatus":0,"sequence":1,"specId":19,"specimageId":14235,"value":"红色","goodsSpecification":{"id":19,"addtime":1520408676000,"deletestatus":0,"name":"颜色","remarkName":null,"sequence":5,"specColor":0,"specType":1,"type":"img","goodsclassId":681,"storeId":90}}],"goodsId":854,"price":2000,"cartId":45,"goodsimage":"http://p35r91t1w.bkt.clouddn.com/upload/store/90/2018/03/07/e3a29845-64ec-4d3e-ba00-70ed886d9fd5.jpg","count":6,"isdis":"0","goodsname":"Hisense/海信LED55EC720US"}]
     */


    private String storename;
    private int storeId;

    private boolean isCheck;
    public boolean isCheck() {
        return isCheck;
    }

    public void setCheck(boolean check) {
        isCheck = check;
    }

    private List<CartBean> cart;

    public String getStorename() {
        return storename;
    }

    public void setStorename(String storename) {
        this.storename = storename;
    }

    public int getStoreId() {
        return storeId;
    }

    public void setStoreId(int storeId) {
        this.storeId = storeId;
    }

    public List<CartBean> getCart() {
        return cart;
    }

    public void setCart(List<CartBean> cart) {
        this.cart = cart;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.storename);
        dest.writeInt(this.storeId);
        dest.writeByte(this.isCheck ? (byte) 1 : (byte) 0);
        dest.writeList(this.cart);
    }

    public NofailureBean() {
    }

    protected NofailureBean(Parcel in) {
        this.storename = in.readString();
        this.storeId = in.readInt();
        this.isCheck = in.readByte() != 0;
        this.cart = new ArrayList<CartBean>();
        in.readList(this.cart, CartBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<NofailureBean> CREATOR = new Parcelable.Creator<NofailureBean>() {
        @Override
        public NofailureBean createFromParcel(Parcel source) {
            return new NofailureBean(source);
        }

        @Override
        public NofailureBean[] newArray(int size) {
            return new NofailureBean[size];
        }
    };
}
